Skip to content

Conversation

sayantn
Copy link
Contributor

@sayantn sayantn commented Aug 30, 2025

  • ADC/ADX
  • _mm512_reduce_mul_ph (missed)
  • _bswap{,64}
  • RDRAND/RDSEED
  • TBM
  • _mm_prefetch - It doesn't actually dereference the pointer argument, so it's safe
  • _mm_{l,s,m}fence - These can't introduce inconsistencies, as they are fences.
  • _mm_pause - It's like std::hint::spin_loop, so nothing unsafe here. Worst it can do is make the program slower

@rustbot
Copy link
Collaborator

rustbot commented Aug 30, 2025

r? @Amanieu

rustbot has assigned @Amanieu.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@Amanieu
Copy link
Member

Amanieu commented Aug 30, 2025

The prefetch intrinsics can also be made safe.

@sayantn
Copy link
Contributor Author

sayantn commented Aug 30, 2025

It has a pointer parameter, can it still be made safe?

Also, what about TSC, CPUID and the fence instructions?

@Amanieu
Copy link
Member

Amanieu commented Sep 4, 2025

These intrinsics are all safe to call as long as the required target features are available.

@rfcbot merge

@rust-rfcbot
Copy link

rust-rfcbot commented Sep 4, 2025

Team member @Amanieu has proposed to merge this. The next step is review by the rest of the tagged team members:

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants